package com.qf.threestagekaohe.service.impl;

import com.qf.threestagekaohe.mapper.DictionaryMapper;
import com.qf.threestagekaohe.pojo.Dictionary;
import com.qf.threestagekaohe.service.DictionaryService;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.session.SqlSession;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.io.IOException;
import java.util.Date;
import java.util.List;

@Service
public class DictionaryServiceImpl implements DictionaryService {
    @Resource
    DictionaryMapper dictionaryMapper;

    @Override
    public List<Dictionary> getAll(){
        List<Dictionary> all = dictionaryMapper.getAll();
        return all;
    }

    @Override
    public List<Dictionary> searchByFour(String name, String type, String status, String stime, String etime) {
        List<Dictionary> dictionaries = dictionaryMapper.searchByFour(name,type,status,stime,etime);
        return dictionaries;
    }

    @Override
    public int add(Dictionary dictionary) {
        int add = dictionaryMapper.add(dictionary);
        return add;
    }

    @Override
    public int edit(Dictionary dictionary) {
        int edit = dictionaryMapper.edit(dictionary);
        return edit;
    }

    @Override
    public int delete(String id) {
        int delete = dictionaryMapper.delete(id);
        return delete;
    }

    @Override
    public int modify(Dictionary dictionary) {

        int modify = dictionaryMapper.modify(dictionary);
        return modify;
    }

    @Override
    public int alldel(String sid) {
        int alldel = dictionaryMapper.alldel(sid);
        return alldel;
    }


}
